Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 7 - View-Related Objects / View-Related Objects Reference
View Port Functions / Manipulating View Port Object Properties


GXGetViewPortMapping

You can use the GXGetViewPortMapping function to retrieve the mapping for a view port object.

gxMapping *GXGetViewPortMapping(gxViewPort source, 
                                 gxMapping *map);
source
A reference to the view port whose mapping you wish to examine.
map
A pointer to a mapping structure. On return, this mapping contains a copy of the information from the mapping property of the source view port.
function result
A pointer to a copy of the mapping property of the source view port. (This value is the same as the value returned in the map parameter.)
DESCRIPTION
The GXGetViewPortMapping function copies the mapping matrix information from the mapping property of the source view port object into the mapping structure pointed to by the map parameter. The function also returns as its function result a pointer to this mapping structure.

To make changes to the source view port's mapping property, you can alter the information returned by this function, and then use the GXSetViewPortMapping function to reassign the altered mapping to the source view port.

If the source view port is the root view port of a view port hierarchy, this function gives the same results as GXGetViewPortGlobalMapping.

ERRORS, WARNINGS, AND NOTICES
Errors 
invalid_viewPort_reference 
parameter_is_nil(debugging version)
SEE ALSO
For examples of the use of this function, see Listing 7-3 on page 7-45 and Listing 7-6 on page 7-48.

To set a view port's mapping, use the GXSetViewPortMapping function, described next.

For information about the gxMapping structure, see the mathematics chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996